<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>箭头函数</title>
</head>

<body>
    <h2>JavaScript 箭头函数</h2>
    <p>箭头函数不需要使用 function、return 关键字及大括号 {}。</p>
    <p>IE11 及更早 IE 版本不支持箭头函数。</p>
    <p id="demo"></p>
    <script>
        const x = (x, y) => x * y;
        document.getElementById("demo").innerHTML = x(5, 5);
    </script>
</body>

</html>